#include "Card.h"
Card::Card(int value)
{
	index=CARD_TYPE_ERR;
	row=-1;
	column=-1;
	m_state=STATE_DI_PAI;
	m_x=0;
	m_y=0;
	m_Card=NULL;
}


Card::~Card(void)
{
}


bool Card::init()
{
	return true;
}
void Card::createSprite(int index)
{
	//m_Card=Sprite::createWithSpriteFrame("11");
}
void Card::onEnter()
{
	Node::onEnter();

	
	if(!m_Card)
	{
		char fname[256];
		sprintf(fname,"%d.png",index);
		m_Card=Sprite::createWithSpriteFrameName(fname);

		m_Card->setPosition(CCPointMake((m_x*(CARDWIDTH+CARDGSP)+CARDWIDTH/2+BLOCKLEFT),m_y*CARDHEIGHT+CARDHEIGHT/2));
	}
	
	
	this->addChild(m_Card);

}
void CardBlock::push(Card *pCard)
{
	m_CardBlock.pushBack(pCard);
}
void CardBlock::pop()
{

}


